package DiWuZhang;

import java.util.Scanner;

public class ShangJi2 {
	public static void main(String[] args) {
		System.out.println("MyShopping管理系统 > 购物结算\n");
		System.out.println("******************************************************************");
		System.out.println("请选择购买的商品编号：");
		System.out.println("1.T恤\t2.网球鞋\t3.网球拍");
		System.out.println("******************************************************************");
		Scanner input=new Scanner(System.in);
		
		String name="";
		double price=0.0;
		int spbh=0;
		String panduan="y";
		while("y".equals(panduan)) {
			System.out.print("请输入商品编号：");
			spbh=input.nextInt();
			switch(spbh) {
			case 1:
				name="T恤";
				price=245.0;
				break;
			case 2:
				name="网球鞋";
				price=570.0;
				break;
			case 3:
				name="网球拍";
				price=320.0;
				break;
			}
			System.out.println(name+"\t"+"¥"+price+"\n");
			System.out.print("是否继续（y/n）：");
			panduan=input.next();
		}
		System.out.println("程序结束！");
		
	}
}
